In stacking technologies, at least two distributed framed devices are connected, and one logic device, e.g. a Virtual Switching System (VSS) is formed. Devices joining in a stack are called stacking members, and the stacking members are connected with one another through a stacking link, as shown in FIG. 1. Multiple stacking members in one stack compose a virtual device with unique bridge Media Access Control (MAC), and the bridge MAC is called stacking bridge MAC. Each stacking member communicates with the external by using the unique bridge MAC. A user manages the stack just as managing a single device, so high availability, good extensibility and simple management is provided. One stack includes one Active device, and other devices in the stack are all Standby devices. The Active device is in charge of managing a stacking control plane, including executing configuration, issuing configuration etc. The Standby devices are in charge of running a data plane and performing data transmission. The data needed by the Standby devices are issued by the Active device uniformly.
The Active device and the Standby devices in the stack use the same bridge MAC and share the same configuration file. When a stacking link is in failure, the stack is split, and each stacking member runs independently, which may result in a collision of multiple Active devices. For example, all stacking members use the same bridge MAC, so a collision of the bridge MAC is caused, which results in that the Spanning Tree Protocol (STP) cannot run; for another example, all stacking members use an IP address in the same configuration file, so a collision of the IP address is caused, which results in that a three layer network cannot be used.
Therefore, the collision of multiple Active devices in the stack needs to be detected and solved. For example, the collision of multiple Active devices may be detected by using a two-layer protocol, e.g. a Port Aggregation Protocol (PAgP) enhanced protocol. As shown in FIG. 2, at the beginning, Switch1 is an Active device and Switch2 is a Standby device; when a stacking link is in failure, Switch2 becomes an Active device, so a collision of double Active devices is caused. By extending a PAgP packet, the new Active device contains its own ACTIVE_ID in the PAgP packet and sends the PAgP packet to the original Active device through an access switch. The original Active device detects that the ACTIVE_ID in the received PAgP packet is different from a local ACTIVE_ID, and shuts down all local ports and enters a Recovery state.
However, the PAgP enhanced protocol only supports the stack composed of two framed devices. When there are three or more devices in the stack, the detection of multiple Active devices needs to be performed, and the PAgP enhanced protocol cannot meet the requirements. As shown in FIG. 3, there are four devices in one stack, two stacking links are in failure, and two Active devices, New Active 1 and New Active 2, are generated newly. However, only the original Active device enters the Recovery state by using the PAgP enhanced protocol, and there are still two Active devices, which results in the collision of multiple Active devices.
In addition, the PAgP enhanced protocol cannot support a case that there are multiple stacks. As shown in FIG. 4, there are two stacks, a stack1 and a stack2, and each stack is composed of two stacking members. Four interfaces of an access switch are configured as one EtherChannel Link, and the four interfaces are connected with the four stacking members respectively. When a stacking link in the stack1 is in failure, StandbyA sends a PAgP message containing ID=2 to the access switch, and the access switch transmits the PAgP message to ports of other three stacking members. After receiving the PAgP message, ActiveA enters the Recovery state. Similarly, both ActiveB and StandbyB also receive the PAgP message and enter the Recovery state. Therefore, the failure of the stacking link in the stack1 results in that the stack2 enters the Recovery state mistakenly.
In addition, not all stacking split can result in the collision of multiple Active devices. The collision of multiple Active devices mainly includes the collision of stacking bridge MAC and the collision of running configuration i.e. the configuration being used by devices. If the two collisions do not exist, even if the stack is split into multiple Active devices, the user network function cannot be affected. In the stacking technology such as an Intelligent Resilient Framework (IRF), the change of the stacking bridge MAC is allowed. For example, when an Active device leaves a stack and does not return to the stack within 6 minutes, the bridge MAC of a newly-selected Active device is used as the stacking bridge MAC, so as to avoid the collision of the bridge MAC of new and original Active devices. In a stack with good planning, a user may divide the configuration to ensure that the configuration used by one stacking member does not overlap with that used by another stacking member, so as to avoid the collision of the running configuration after the stack is split. However, the PAgP enhanced protocol only takes the change of the Active ID into account, so no matter whether the collision exists, the collision process is performed once the stack is split and there are two Active devices.